home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_control-center.idb / usr / freeware / include / capplet-widget.h.z / capplet-widget.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  2.0 KB  |  66 lines

  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
  2. #ifndef __CAPPLET_WIDGET_H__
  3. #define __CAPPLET_WIDGET_H__
  4.  
  5. #include <gtk/gtk.h>
  6. #include <gnome.h>
  7. #include <stdarg.h>
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif /* __cplusplus */
  12.  
  13.  
  14. #define CAPPLET_WIDGET(obj)          GTK_CHECK_CAST (obj, capplet_widget_get_type (), CappletWidget)
  15. #define CAPPLET_WIDGET_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, control_center_widget_get_type (), ControlCenterWidgetClass)
  16. #define IS_CAPPLET_WIDGET(obj)       GTK_CHECK_TYPE (obj, capplet_widget_get_type ())
  17.  
  18. typedef struct _CappletWidget                CappletWidget;
  19. typedef struct _CappletWidgetClass        CappletWidgetClass;
  20.  
  21. struct _CappletWidget
  22. {
  23.     GtkPlug            window;
  24.     int            control_center_id;
  25.         int            capid;
  26.         gboolean         changed;
  27.         guint32            xid;
  28. };
  29.  
  30. struct _CappletWidgetClass
  31. {
  32.     GtkPlugClass         parent_class;
  33.  
  34.         void (* try)         (CappletWidget *capplet);
  35.         void (* revert)     (CappletWidget *capplet);
  36.         void (* ok)         (CappletWidget *capplet);
  37.         void (* cancel)        (CappletWidget *capplet);
  38.         void (* help)         (CappletWidget *capplet);
  39.         void (* new_multi_capplet)     (CappletWidget *capplet);
  40.         void (* page_hidden)    (CappletWidget *capplet);
  41.         void (* page_shown)    (CappletWidget *capplet);
  42. };
  43.  
  44. guint           capplet_widget_get_type           (void);
  45. GtkWidget*      capplet_widget_new                ();
  46. GtkWidget*      capplet_widget_multi_new           (gint capid);
  47.  
  48.         
  49.  
  50. void        capplet_gtk_main          (void);
  51. /* returns 0 upon successful initialization.
  52.    returns 1 if --init-session-settings was passed on the cmdline
  53.    returns 2 if --ignore was passed on the cmdline
  54.    returns -1 upon error
  55. */
  56. gint gnome_capplet_init (const char *app_id, const char *app_version,
  57.                          int argc, char **argv, struct poptOption *options,
  58.                          unsigned int flags, poptContext *return_ctx);
  59. void         capplet_widget_state_changed     (CappletWidget *cap, gboolean undoable);
  60.  
  61.  
  62. #ifdef __cplusplus
  63. }
  64. #endif /* __cplusplus */
  65. #endif /* __CAPPLET_WIDGET_H__ */
  66.